const person = {
  name: 'zce',
  age: 20
}

const personProxy = new Proxy(person, {
  get(target, property) {
    console.log(`get-target:`, target);
    console.log(`get-property:`, property);
    return property in target ? target[property] : undefined
  },
  set(target, property, value) {
    console.log(`set-target:`, target);
    console.log(`set-property:`, property);
    console.log(`set-value:`, value);

    target[property] = value;
  }
});

personProxy.age = 100;

console.log(personProxy.name);
console.log(personProxy.xxxx);//不存在的值